<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>hello_react</title>
  <style>
    .title{
      background-color: orange;
      width: 250px;
    }
  </style>
</head>
<body>
  <div id="test"></div>

  <script type="text/javascript" src="../../js/react.development.js" ></script>
  <script type="text/javascript" src="../../js/react-dom.development.js"></script>
  <script type="text/javascript" src="../../js/babel.min.js"></script>

  <script type="text/babel">
    const id = "aTgUIGU"
    const data = "HELlo, rEAct!"

    /* jsx中, 最外层的{} 表示这是一个js表达式, 里面的{}表示这是一个对象. {}中的字符串不带引号表示一个变量 */
    const vDom = (
      <div>
        <h1 className='title' id={id.toLowerCase()}>
          <span style={{color: 'white'}}>{data.toLowerCase()}</span>
        </h1>
        <h1 className='title' id={id.toUpperCase()}>
          <span style={{color: 'white'}}>{data.toUpperCase()}</span>
        </h1>
        <input type='text'></input>
        <good>123</good>
      </div>
     )
    ReactDOM.render(vDom, document.getElementById('test'));
  </script>
</body>